Skip to content

Reject nested window functions in the Snowflake dialect - #69

Merged
osipovartem merged 1 commit into
embucket-sync-df55.0.0from
snowflake-reject-nested-windows
Sep 6, 2026
Merged

Reject nested window functions in the Snowflake dialect#69
osipovartem merged 1 commit into
embucket-sync-df55.0.0from
snowflake-reject-nested-windows

Conversation

@osipovartem

Copy link
Copy Markdown
Collaborator

Summary

  • remove dialect-specific staged planning for window functions nested inside other window functions
  • restore DataFusion planning validation for the Snowflake dialect
  • retain supported aggregate-inside-window planning
  • add a Snowflake-dialect regression test for the rejection

Snowflake oracle

The previous behavior was based on an incorrect compatibility assumption. Snowflake rejects:

SELECT SUM(SUM(column1) OVER ()) OVER ()
FROM VALUES (1), (2), (3);

with error 002062 (42601): Window function ... may not be nested inside another window function.

Validation

  • cargo +1.97.0 test -p datafusion-sql --lib --tests (92 unit + 586 integration passed)
  • targeted nested-window and aggregate-inside-window tests passed
  • cargo +1.97.0 clippy -p datafusion-sql --all-targets -- -D warnings
  • cargo +1.97.0 fmt --check
  • git diff --check

@osipovartem
osipovartem merged commit 3105bf0 into embucket-sync-df55.0.0 Sep 6, 2026
19 checks passed
@osipovartem
osipovartem deleted the snowflake-reject-nested-windows branch September 6, 2026 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant